Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility issues #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Accessibility issues #80

wants to merge 2 commits into from

Conversation

occupant
Copy link
Member

@occupant occupant commented Oct 11, 2024

We had an accessibility scan on EXL and the one very problematic finding was that the mobile navigation trigger wasn't functional when navigating via keyboard (keyboard access was likely only ever tested in a desktop context).

This isn't a Galactus-specific issue, it's a CLF-wide issue.

Changing the a tag to a button allows for correct focus and function of the trigger. While this could also be done with just aria, I think using the a tag here is less correct; there is no link to another location, it's a trigger.

The unfortunte consequence of changing the element is that the styles need to be updated as well. I've added these in the clf.drupal.css file, but I'm sure it could have a better home.

I've also added the aria-controls and aria-label attributes to improve screenreader feedback on the two collapsible regions in the header.

There's more to do, but this seems to be low-hanging fruit.

Changes mobile nav trigger from a tag to button tag so that it can be triggered by keyboard.
Adds additional aria-label and aria-controls to improve screenreader feedback
Add adjustments to mobile trigger styles introduced by replacing the a tag with a button tag
@occupant occupant requested a review from joelpittet October 11, 2024 00:12
box-sizing: border-box !important;
margin-top: 7px !important;
padding: 11px 13px !important;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be all you need and matches the CLF specificity, assuming this file is loaded after the CLF

#ubc7-unit .navbar .btn-navbar {
  height: 35px;
  width: 45px;
  padding: 11px 13px;
}
Screenshot 2024-10-28 at 09 44 04

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, strange. I'm going to have to take another look at why I went so hard on the specificity. I hate using important, so I must have had a reason (or so I hope). Thanks for taking a look and setting me straight on that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@occupant I added .navbar into your selector so I did make it more specific than your original, maybe that was it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants